/*
 *  Platform_Debugging.cpp
 *  Fridge
 *
 *  Created by Jeremy Abel on 6/21/12.
 *  Copyright 2012 __MyCompanyName__. All rights reserved.
 *
 */

#include "Debugging.h"

#include <stdio.h>
#include <stdarg.h>
#include <assert.h>

#include <QDebug>

#ifndef FRIDGE_RELEASE

void FAssert( bool bCondition )
{
	assert( bCondition );
}

void FridgeLog( const char* szMsg )
{
	printf("%s\n", szMsg);

    qDebug() << szMsg;
}

void FridgeLogf( const char* szMsg, ... )
{
	// Just output to the debugger
	
	char szBuffer[1024];
	va_list xArg;
	va_start( xArg, szMsg );
	vsnprintf( szBuffer, 1024, szMsg, xArg );
    printf("%s\n", szBuffer);

    qDebug() << szBuffer;

    va_end( xArg );
}

#endif

